//
//  HDSegmentMenu.h
//  Wujie
//
//  Created by haidong on 2017/4/24.
//  Copyright © 2017年 WuJieShengHuo. All rights reserved.
//

#import <UIKit/UIKit.h>

#define SlideLineHeight 2

@protocol HDSegmentMenuDelegate <NSObject>

- (void)segmentMenuSelectAtIndex:(NSInteger)index;

@end

typedef void(^SegmentSelectedBlock)(NSInteger index);

@interface HDSegmentMenu : UIView

@property (nonatomic, copy)NSArray *titlesArr;
@property (nonatomic, copy)SegmentSelectedBlock segmentSelectedBlock;
@property (weak, nonatomic)id <HDSegmentMenuDelegate> delegate;

- (instancetype)initWithFrame:(CGRect)frame titlesArray:(NSArray *)titlesArray selectedColor:(UIColor *)selectedColor itemSpace:(float)space withSelectedIndex:(NSInteger)index;

- (void)setButtonSelectedAtIndex:(NSInteger)index;

@end
